package org.demo.xml.bean;

import java.util.ArrayList;
import java.util.List;

import javax.xml.bind.annotation.XmlAttribute;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlRootElement;

/**
 * 
 * @author  
 * @date    2010-12-20
 * @file    org.demo.xml.bean.GraphBean.java
 */
@XmlRootElement(name="graph")
public class GraphBean {
	
	private String caption;

	private List<DetailInfoBean> detailList = new ArrayList<DetailInfoBean>();
	
	private TrendLinesBean trendLines;
	
	/**
	 * @return the caption
	 */
	@XmlAttribute
	public String getCaption() {
		return caption;
	}

	/**
	 * @param caption the caption to set
	 */
	public void setCaption(String caption) {
		this.caption = caption;
	}

	/**
	 * @return the detailList
	 */
	@XmlElement(name="set")
	public List<DetailInfoBean> getDetailList() {
		return detailList;
	}

	/**
	 * @param detailList the detailList to set
	 */
	public void setDetailList(List<DetailInfoBean> detailList) {
		this.detailList = detailList;
	}

	/**
	 * @return the trendLines
	 */
	@XmlElement(name="trendlines")
	public TrendLinesBean getTrendLines() {
		return trendLines;
	}

	/**
	 * @param trendLines the trendLines to set
	 */
	public void setTrendLines(TrendLinesBean trendLines) {
		this.trendLines = trendLines;
	}

	/**
	 * add a set bean
	 * @param bean
	 */
	public void addDetail(DetailInfoBean bean){
		this.detailList.add(bean);
	}
}
